import React from 'react'
import routerConfig from "../routter1"
import {Suspense} from "react"
import {useRoutes} from "react-router-dom"
import {Routes,Route, Navigate,NavLink} from "react-router-dom"
import A from './a'
import B from './b'
import Ason from './ason'
function App() {
  return (
    <>
    <Suspense fallback={<div>...laoding</div>}>
        {
            useRoutes(routerConfig)
        }

    </Suspense>
        {/* <Routes>
                <Route path="/a" element={<A></A>}>
                    <Route path="/a/ason" element={<Ason></Ason>}></Route>
                    <Route path="/a" element={<Navigate to="/a/ason"></Navigate>}></Route>
                </Route>
                <Route path="/b" element={<B></B>}></Route>
                <Route path="/" element={<Navigate to="/a"></Navigate>}></Route>

        </Routes>
        <NavLink to="/a/ason">ason</NavLink>
        <NavLink to="/b" >b</NavLink> */}
    </>
  )
}

export default App